<me:ViewBase x:Class="WPFExcelReport.ITXDBQUERY"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:me="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                   x:Name="TV"
                  Loaded="Window_Loaded"
                    >
    <me:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/> 
    </me:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="200" />
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
            <WrapPanel >
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=查询}}" Click="Load_Click"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=输出}}" Click="btnPrint_Click"></Button>
            </WrapPanel>
        </StackPanel> 
        <TextBox Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="txtQuery" Text="SELECT * FROM ABPOS WHERE ABPAUFKRS='X4'" TextWrapping="Wrap"></TextBox>        
        <DataGrid  Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="1"
                   Name="dlgResult"
                              AutoGenerateColumns="True"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding}"  
                              HeadersVisibility="Column"                               
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0.6,0" 
                              >
        </DataGrid>
    </Grid>
</me:ViewBase>
